﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace SpeechBill
{
    public partial class selSp : Form
    {
        public selSp()
        {
            InitializeComponent();
        }

        private void selSp_Load(object sender, EventArgs e)
        {


        }

        private void button1_Click(object sender, EventArgs e)
        {
            SqlConnection con = DBHelper.GetCon();
            string c_day = dateTimePicker1.Text.ToString();
            string cmdTest = "select * from consume where c_money < "+int.Parse(textBox1.Text);
            SqlCommand cmd = new SqlCommand(cmdTest, con);
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            DataSet ds = new DataSet();
            sda.Fill(ds, "consumesel");
            //2、将数据显示在控件上
            dataGridView1.DataSource = ds.Tables["consumesel"];
        }
    }
}
